import { Observer } from "mobx-vue"
import { Component, Vue } from "vue-property-decorator";
require('./videoPreview.scss')

@Observer
@Component({
  props: {
    url: {
      type: String,
      default: null
    },
    clear: {
      type: Boolean,
      default: true
    }
  }
})
export default class CsjImagePreview extends Vue {
  isShowModel: boolean = false;
  loading: boolean = true;
  previewStyle: any = 'width:100%';
  async mounted() {
    let vm: any = this;
    vm.isShowModel = true;
    vm.loading = false;
  }

  //关闭
  close() {
    let vm: any = this;
    let xwindow: any = window
    vm.isShowModel = false;
    if (!vm.clear) {
      xwindow.clearBodyStyle()
    }
    vm.$emit('close')
  }
}